<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>DOM树</title>
  </head>
  <body>
    HTML 题：
    将类似以下JSON表示的树状结构（可以无限层级）通过parseDOM函数（使用document.createElement，document.createTextNode，appendChild等方法）生成一颗DOM树（返回一个element元素）并挂载在页面上
  </body>
  <script>
    const JsonTree = {
      tagName: "ul",
      props: { className: "list", "data-name": "jsontree" },
      children: [
        {
          tagName: "li",
          children: [
            {
              tagName: "img",
              props: {
                src:
                  "//img.alicdn.com/tps/TB1HwXxLpXXXXchapXXXXXXXXXX-32-32.ico",
                width: "16px"
              }
            }
          ]
        },
        {
          tagName: "li",
          children: [
            {
              tagName: "a",
              props: {
                href: "https://www.aliyun.com",
                target: "_blank"
              },
              children: "阿里云"
            }
          ]
        }
      ]
    };
    // 写出步骤，挂载在页面上显示。
    function parseDOM(jsontree) {}
  </script>
</html>
